#ifndef RAY_H_
#define RAY_H_

#include "Point.h"
#include "Vector.h"

namespace Geometry
{
	class Ray
	{
		Point  m_p;
		Vector m_q;

	public:
		
		Ray(){}
        Ray( Point _p, Vector _q):m_p(_p),m_q(_q){}

		inline void operator()( Point& _p, Vector& _q );

		inline Point  p() const { return m_p; };
		inline Vector q() const { return m_q; };
	};

	inline void Ray::operator()( Point& _p, Vector& _q )
	{
		m_p = _p;
		m_q = _q;
	}

	inline float operator*( Ray& r, Vector& v ) { return r.q() * v; }
	inline float operator*( Vector& v, Ray& r ) { return r.q() * v; }
}
#endif